package com.woohua.demo.ocr;

import com.woohua.demo.domain.PrescriptionVO;
import net.sourceforge.tess4j.ITesseract;
import net.sourceforge.tess4j.Tesseract;
import net.sourceforge.tess4j.TesseractException;

import java.io.File;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/***
 * @title IDCardOCR
 * @description
 * @author baiji
 * @version 1.0.0
 * @create 2023/7/19 17:11
 **/
public class IDCardOCR {

    public static void main(String[] args) {
        // 指定Tesseract OCR的数据文件夹路径
//        String tessDataPath = "D:\\tessdata\\tessdata-master";
////
////        // 实例化Tesseract OCR引擎
////        ITesseract tesseract = new Tesseract();
////        tesseract.setDatapath(tessDataPath);
////
////        // 简体中文库
////        tesseract.setLanguage("chi_sim_vert");
////
////        try {
////            // 读取身份证图像
////            File imageFile = new File("D:\\tmp\\身份证.png");
////
////            // 进行OCR识别
////            String result = tesseract.doOCR(imageFile);
////
////            // 输出识别结果
////            System.out.println(result);
////        } catch (TesseractException e) {
////            System.err.println(e.getMessage());
////        }
        PrescriptionVO prescriptionVO = new PrescriptionVO();

        System.out.println(prescriptionVO.getChannelSourceType().equals(1));
    }
}
